{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e3ebd38a",
   "metadata": {},
   "source": [
    "# How to Train [model] on Custom Dataset"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "525c30cc",
   "metadata": {},
   "source": [
    "### Overview\n",
    "\n",
    "- GitHub repository link\n",
    "- Roboflow Blogpost link\n",
    "- YouTube video link\n",
    "\n",
    "### Steps Covered in this Tutorial\n",
    "\n",
    "**NOTE:** List below is just a placeholder. Feel free to add, remove and swap points, if you need.\n",
    "\n",
    "- Clone repository and install dependencies\n",
    "- Test inference using pre-trained model\n",
    "- Prepare custom dataset\n",
    "- Train\n",
    "- Evaluate\n",
    "- Active Learning example\n",
    "\n",
    "\n",
    "### Custom Dataset\n",
    "\n",
    "In this tutorial, we will utilize an open source computer vision dataset from one of the 100,000+ available on [Roboflow Universe](https://universe.roboflow.com/).\n",
    "\n",
    "<p align=\"center\">\n",
    "    </br>\n",
    "    <img width=\"400\" src=\"https://github.com/roboflow-ai/notebooks/raw/main/assets/roboflow_logotype_color.svg\" alt=\"roboflow logo\">\n",
    "    </br>\n",
    "</p>\n",
    "\n",
    "If you already have your own images (and, optionally, annotations), you can convert your dataset using [Roboflow](https://roboflow.com/), a set of tools developers use to build better computer vision models quickly and accurately. 100k+ developers use roboflow for (automatic) annotation, converting dataset formats, training, deploying, and improving their datasets/models.\n",
    "\n",
    "Follow the [getting started guide here](https://docs.roboflow.com/quick-start) to create and prepare your own custom dataset."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8ee00c6f",
   "metadata": {},
   "source": [
    "## 0. Before you start [Optional if GPU is required]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "38564dd9",
   "metadata": {},
   "source": [
    "Before we begin, make sure you have a GPU at your disposal. You can do this using `nvidia-smi` command. In case of any errors:\n",
    "- **Google Colab** - `Runtime --> Change Runtime Type --> Hardware accelerator --> GPU`\n",
    "- **Kaggle** - `Settings --> Enable GPU`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "66ef923a",
   "metadata": {},
   "outputs": [],
   "source": [
    "!nvidia-smi"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d4a7da16",
   "metadata": {},
   "source": [
    "## 1. Clone repository and install dependencies"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "829ce939",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6ac9d290",
   "metadata": {},
   "source": [
    "## 2. Test inference using pre-trained model"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "45525e96",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "ed8530f8",
   "metadata": {},
   "source": [
    "## 3. Prepare custom dataset"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "08a92262",
   "metadata": {},
   "source": [
    "Not sure how to download your dataset from Roboflow? Take a look at our [documentation](https://docs.roboflow.com/exporting-data)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b6c1363d",
   "metadata": {},
   "outputs": [],
   "source": [
    "# REPLACE with your custom code snippet generated above\n",
    "\n",
    "!pip install roboflow\n",
    "\n",
    "from roboflow import Roboflow\n",
    "rf = Roboflow(api_key=\"YOUR API KEY\")\n",
    "project = rf.workspace(\"YOUR-WORKSPACE\").project(\"YOUR-PROJECT\")\n",
    "dataset = project.version(\"DATA-SET-VERSION\").download(\"DATA-SET-FORMAT\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bd80e115",
   "metadata": {},
   "source": [
    "## 4. Train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ac438ccd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "e731057f",
   "metadata": {},
   "source": [
    "## 5. Evaluate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c8e69ae8",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6929a4e6",
   "metadata": {},
   "source": [
    "## 6. Active Learning example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fc3985d5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
